import request from "@/utils/request";

// 获取区房屋管理单位
export function getArea(data) {
  return request({
    url: "/block/getArea",
    method: "GET",
    params: { ...data },
  });
}
// 根据区获取部门
export function getHouseAdmin(data) {
  return request({
    url: "/block/getHouseAdmin",
    method: "GET",
    params: { ...data },
  });
}
// 部门列表
export function houseAdminList(data) {
  return request({
    url: "/block/houseAdminList",
    method: "GET",
    params: { ...data },
  });
}
// 添加部门
export function addHouseAdmin(data) {
  return request({
    url: "/block/addHouseAdmin",
    method: "Post",
    data: { ...data },
  });
}
// 部门详情
export function houseAdminDetails(data) {
  return request({
    url: "/block/houseAdminDetails",
    method: "GET",
    params: { ...data },
  });
}
// 修改部门
export function updHouseAdmin(data) {
  return request({
    url: "/block/updHouseAdmin",
    method: "Post",
    data: { ...data },
  });
}
// 删除部门
export function delHouseAdmin(data) {
  return request({
    url: "/block/delHouseAdmin",
    method: "GET",
    params: { ...data },
  });
}
// 部门合并
export function houseAdminMerge(data) {
  return request({
    url: "/block/houseAdminMerge",
    method: "Post",
    data: { ...data },
  });
}
// 部门拆分
export function houseAdminSplit(data) {
  return request({
    url: "/block/houseAdminSplit",
    method: "Post",
    data: { ...data },
  });
}
// 管片列表
export function blockGroupList(data) {
  return request({
    url: "/block/blockGroupList",
    method: "GET",
    params: { ...data },
  });
}
// 添加管片
export function addBlockGroup(data) {
  return request({
    url: "/block/addBlockGroup",
    method: "GET",
    params: { ...data },
  });
}
// 管片详情
export function blockGroupDetails(data) {
  return request({
    url: "/block/blockGroupDetails",
    method: "GET",
    params: { ...data },
  });
}
// 修改管片
export function updBlockGroup(data) {
  return request({
    url: "/block/updBlockGroup",
    method: "GET",
    params: { ...data },
  });
}
// 删除管片
export function delBlockGroup(data) {
  return request({
    url: "/block/delBlockGroup",
    method: "GET",
    params: { ...data },
  });
}
// 管片合并
export function blockGroupMerge(data) {
  return request({
    url: "/block/blockGroupMerge",
    method: "Post",
    data: { ...data },
  });
}
// 管片拆分
export function blockGroupSplit(data) {
  return request({
    url: "/block/blockGroupSplit",
    method: "Post",
    data: { ...data },
  });
}
// 所列表
export function blockList(data) {
  return request({
    url: "/block/blockList",
    method: "Post",
    data: { ...data },
  });
}
// 获取管片下面的所
export function getBlockByGroup(data) {
  return request({
    url: "/block/getBlockByGroup",
    method: "GET",
    params: { ...data },
  });
}

export function blockPageInfo(data) {
  return request({
    url: "/common/blockListInfo",
    method: "GET",
    params: data,
  });
}

export function companyListApi(data) {
  return request({
    url: "/common/getArea",
    method: "GET",
    params: data,
  });
}

export function deptPageInfo(data) {
  return request({
    url: "/common/getHouseAdmin",
    method: "GET",
    params: data,
  });
}
// 新增所资料（产权情况、建筑构造、房屋现状）
export function addBlockDetail(data) {
  return request({
    url: "/block/addBlockDetail",
    method: "Post",
    data: { ...data },
  });
}
// 修改所资料（产权情况、建筑构造、房屋现状）
export function updBlockDetail(data) {
  return request({
    url: "/block/updBlockDetail",
    method: "Post",
    data: { ...data },
  });
}
// 添加所产权变动
export function addBlockChange(data) {
  return request({
    url: "/block/addBlockChange",
    method: "Post",
    data: { ...data },
  });
}
// 单个所详情（产权变动）
export function blockDetailChange(data) {
  return request({
    url: "/block/blockDetailChange",
    method: "GET",
    params: { ...data },
  });
}
// 所删除
export function delBlock(data) {
  return request({
    url: "/block/delBlock",
    method: "GET",
    params: { ...data },
  });
}
// 修改所产权变动
export function updBlockChange(data) {
  return request({
    url: "/block/updBlockChange",
    method: "Post",
    data: { ...data },
  });
}
// 所产权变动详情
export function blockChangeData(data) {
  return request({
    url: "/block/blockChangeData",
    method: "GET",
    params: { ...data },
  });
}
// 所产权证件详情
export function blockDetailCertificate(data) {
  return request({
    url: "/block/blockDetailCertificate",
    method: "GET",
    params: { ...data },
  });
}

// 单个所详情（维修记录）
export function blockDetailRepair(data) {
  return request({
    url: "/block/blockDetailRepair",
    method: "GET",
    params: { ...data },
  });
}
// 添加所维修记录
export function addBlockRepair(data) {
  return request({
    url: "/block/addBlockRepair",
    method: "Post",
    data: { ...data },
  });
}

// 所维修详情
export function blockRepairData(data) {
  return request({
    url: "/block/blockRepairData",
    method: "GET",
    params: { ...data },
  });
}
// 修改所维修记录
export function updBlockRepair(data) {
  return request({
    url: "/block/updBlockRepair",
    method: "Post",
    data: { ...data },
  });
}

// 单个所详情（其他记录）
export function blockDetailOtherRepair(data) {
  return request({
    url: "/block/blockDetailOtherRepair",
    method: "GET",
    params: { ...data },
  });
}
// 添加所其他记录
export function addBlockOther(data) {
  return request({
    url: "/block/addBlockOther",
    method: "Post",
    data: { ...data },
  });
}

// 所其他详情
export function blockOtherData(data) {
  return request({
    url: "/block/blockOtherData",
    method: "GET",
    params: { ...data },
  });
}
// 修改所其他记录
export function updBlockOther(data) {
  return request({
    url: "/block/updBlockOther",
    method: "Post",
    data: { ...data },
  });
}


// 所图形资料详情
export function blockDetailMap(data) {
  return request({
    url: "/block/blockDetailMap",
    method: "GET",
    params: { ...data },
  });
}
// 添加所图形资料
export function addBlockMap(data) {
  return request({
    url: "/block/addBlockMap",
    method: "Post",
    data: { ...data },
  });
}

// 删除所图形资料
export function delBlockMap(data) {
  return request({
    url: "/block/delBlockMap",
    method: "GET",
    params: { ...data },
  });
}


// 单个所详情（产权情况、建筑构造、房屋现状）
export function blockDetail(data) {
  return request({
    url: "/block/blockDetail",
    method: "GET",
    params: { ...data },
  });
}
// 房间资料
export function roomList(data) {
  return request({
    url: "/block/roomList",
    method: "GET",
    params: { ...data },
  });
}
// 添加房间基本信息
export function addRoom(data) {
  return request({
    url: "/block/addRoom",
    method: "Post",
    data: { ...data },
  });
}
// 房间基本信息
export function roomDetails(data) {
  return request({
    url: "/block/roomDetails",
    method: "GET",
    params: { ...data },
  });
}
// 删除房间
export function delRoom(data) {
  return request({
    url: "/block/delRoom",
    method: "GET",
    params: { ...data },
  });
}
// 删除房间设备
export function delRoomFacility(data) {
  return request({
    url: "/block/delRoomFacility",
    method: "GET",
    params: { ...data },
  });
}
// 房间设备详情
export function roomFacilityData(data) {
  return request({
    url: "/block/roomFacilityData",
    method: "GET",
    params: { ...data },
  });
}
// 修改房间设备
export function updRoomFacility(data) {
  return request({
    url: "/block/updRoomFacility",
    method: "Post",
    data: { ...data },
  });
}	
// 修改房间基本信息（修改租金）
export function updRoom(data) {
  return request({
    url: "/block/updRoom",
    method: "Post",
    data: { ...data },
  });
}
// 房间设备列表
export function roomFacilityList(data) {
  return request({
    url: "/block/roomFacilityList",
    method: "GET",
    params: { ...data },
  });
}
// 添加房间设备
export function addRoomFacility(data) {
  return request({
    url: "/block/addRoomFacility",
    method: "Post",
    data: { ...data },
  });
}
// 房间历年租金
export function roomYearRent(data) {
  return request({
    url: "/block/roomYearRent",
    method: "GET",
    params: { ...data },
  });
}


// 工龄列表
export function staffList(data) {
  return request({
    url: "/block/staffList",
    method: "GET",
    params: { ...data },
  });
}
// 添加工龄详情
export function addStaffDetail(data) {
  return request({
    url: "/block/addStaffDetail",
    method: "Post",
    data: { ...data },
  });
}
// 工龄详情
export function staffDetail(data) {
  return request({
    url: "/block/staffDetail",
    method: "GET",
    params: { ...data },
  });
}
// 修改工龄详情
export function updStaffDetail(data) {
  return request({
    url: "/block/updStaffDetail",
    method: "Post",
    data: { ...data },
  });
}
// 删除工龄详情
export function delStaffDetail(data) {
  return request({
    url: "/block/delStaffDetail",
    method: "GET",
    params: { ...data },
  });
}

// 售房信息
export function buyerList(data) {
  return request({
    url: "/block/buyerList",
    method: "GET",
    params: { ...data },
  });
}
// 添加售房信息
export function addBuyer(data) {
  return request({
    url: "/block/addBuyer",
    method: "Post",
    data: { ...data },
  });
}
// 修改售房信息
export function updBuyer(data) {
  return request({
    url: "/block/updBuyer",
    method: "Post",
    data: { ...data },
  });
}
// 删除售房信息
export function delBuyer(data) {
  return request({
    url: "/block/delBuyer",
    method: "GET",
    params: { ...data },
  });
}
// 售房详情
export function buyerData(data) {
  return request({
    url: "/block/buyerData",
    method: "GET",
    params: { ...data },
  });
}


// 数据查询-所信息
export function dataBlockPage(data) {
  return request({
    url: "/block/dataBlockPage",
    method: "GET",
    params: { ...data },
  });
}

// 数据查询-房间信息
export function dataRoomPage(data) {
  return request({
    url: "/block/dataRoomPage",
    method: "GET",
    params: { ...data },
  });
}

// 文件上传
export function upload(data) {
  return request({
    url: "/fileUpload/upload",
    method: "Post",
    data: { ...data },
  });
}
// 权限申请
export function permissionApply(data) {
  return request({
    url: "/block/permissionApply",
    method: "Post",
    data: { ...data },
  });
}
// 权限审核列表
export function permissionApplyList(data) {
  return request({
    url: "/block/permissionApplyList",
    method: "GET",
    params: { ...data },
  });
}
// 权限审核
export function permissionReview(data) {
  return request({
    url: "/block/permissionReview",
    method: "GET",
    params: { ...data },
  });
}
// 获取当前用户权限
export function getPermission(data) {
  return request({
    url: "/block/getPermission",
    method: "GET",
    params: { ...data },
  });
}

// 房间复制列表
export function roomCopyList(data) {
  return request({
    url: "/block/roomCopyList",
    method: "GET",
    params: { ...data },
  });
}

// 产权管理列表
export function certificateList(data) {
  return request({
    url: "/block/certificateList",
    method: "GET",
    params: { ...data },
  });
}

// 添加产权
export function addCertificate(data) {
  return request({
    url: "/block/addCertificate",
    method: "Post",
    data: { ...data },
  });
}
// 单元资料
export function unitPage(data) {
  return request({
    url: "/block/unitPage",
    method: "GET",
    params: { ...data },
  });
}

// 添加房间历年租金
export function addRoomYearRent(data) {
  return request({
    url: "/block/addRoomYearRent",
    method: "Post",
    data: { ...data },
  });
}
// 房间总汇信息
export function allRoomData(data) {
  return request({
    url: "/block/allRoomData",
    method: "GET",
    params: { ...data },
  });
}
// 产权注销
export function delCertificate(data) {
  return request({
    url: "/block/delCertificate",
    method: "GET",
    params: { ...data },
  });
}
// 产权管理修改
export function updCertificate(data) {
  return request({
    url: "/block/updCertificate",
    method: "Post",
    data: { ...data },
  });
}
// 产权管理
export function certificateData(data) {
  return request({
    url: "/block/certificateData",
    method: "GET",
    params: { ...data },
  });
}
// 批量删除所
export function delMultipleBlock(data) {
  return request({
    url: "/block/delMultipleBlock?blockID="+data.blockID,
    method: "GET",
  });
}
// 批量删除所图形资料
export function delMultipleBlockMap(data) {
  return request({
    url: "/block/delMultipleBlockMap?mapid="+data.mapid,
    method: "GET",
  });
}
// 批量删除所管片资料
export function delMultipleBlockGroup(data) {
  return request({
    url: "/block/delMultipleBlockGroup?GroupNo="+data.GroupNo,
    method: "GET",
  });
}
// 批量删除房间
export function delMultipleRoom(data) {
  return request({
    url: "/block/delMultipleRoom?RoomID="+data.RoomID,
    method: "GET",
  });
}
// 批量删除部门
export function delMultipleHouseAdmin(data) {
  return request({
    url: "/block/delMultipleHouseAdmin?AID="+data.AID,
    method: "GET",
  });
}
// 批量删除工龄
export function delMultipleStaffDetail(data) {
  return request({
    url: "/block/delMultipleStaffDetail?autoid="+data.autoid,
    method: "GET",
  });
}
// 批量删除售房信息
export function delMultipleBuyer(data) {
  return request({
    url: "/block/delMultipleBuyer?buyId="+data.buyId,
    method: "GET",
  });
}

// 获取所编号
export function getBLockNo(data) {
  return request({
    url: "/block/getBLockNo",
    method: "GET",
    params: { ...data },
  });
}

// 所列表导出
export function blockListDao(data) {
  return request({
    url: "/block/blockListDao",
    method: "GET",
    params: { ...data },
  });
}

// 根据合同获取经租信息
export function getRent(data) {
  return request({
    url: "/block/getRent",
    method: "GET",
    params: { ...data },
  });
}
// 获取年份价格下拉
export function getYearPrice(data) {
  return request({
    url: "/block/getYearPrice",
    method: "GET",
    params: { ...data },
  });
}
// 根据所号获取经租合同编号列表
export function RenterListByblockno(data) {
  return request({
    url: "/common/RenterListByblockno",
    method: "GET",
    params: { ...data },
  });
}

// 获取地下室列表
export function getBasement(data) {
  return request({
    url: "/block/getBasement",
    method: "GET",
    params: { ...data },
  });
}

// 添加地下室
export function addBasement(data) {
  return request({
    url: "/block/addBasement",
    method: "Post",
    data: { ...data },
  });
}

// 修改地下室
export function updBasement(data) {
  return request({
    url: "/block/updBasement",
    method: "Post",
    data: { ...data },
  });
}
// 删除地下室
export function delBasement(data) {
  return request({
    url: "/block/delBasement",
    method: "GET",
    params: { ...data },
  });
}

// 数据查询-单元资料
export function unitPageData(data) {
  return request({
    url: "/block/unitPageData",
    method: "GET",
    params: { ...data },
  });
}
// 数据查询-所信息合计
export function dataBlockAll(data) {
  return request({
    url: "/block/dataBlockAll",
    method: "GET",
    params: { ...data },
  });
}


// 批量更改所归属管片
export function updAllBlockGroup(data) {
	console.log(data)
	return request({
		url: "/block/updAllBlockGroup?blockno="+data.blockno+'&groupNew='+data.groupNew,
		method: "GET",
	});
}
// 统一数据处理-自来水移交操作批处理
export function waterDP(data) {
  return request({
    url: "/block/waterDP",
    method: "GET",
    params: { ...data },
  });
}
// 统一数据处理-管理形式及产别变更批处理
export function manageWayDP(data) {
  return request({
    url: "/block/manageWayDP",
    method: "GET",
    params: { ...data },
  });
}
// 统一数据处理-待注销变动操作批处理
export function changeDP(data) {
  return request({
    url: "/block/changeDP",
    method: "GET",
    params: { ...data },
  });
}
// 统一数据处理-注销变动操作批处理
export function cancelWayDP(data) {
  return request({
    url: "/block/cancelWayDP",
    method: "GET",
    params: { ...data },
  });
}

// 月增减变动
export function mouthAddSubtractChange(data) {
  return request({
    url: "/block/mouthAddSubtractChange",
    method: "GET",
    params: { ...data },
  });
}
// 修改
export function update(data) {
  return request({
    url: "/district/update",
    method: "Post",
    data: { ...data },
  });
}
// 所历史管片
export function blockHisBlockGroup(data) {
  return request({
    url: "/block/blockHisBlockGroup",
    method: "GET",
    params: { ...data },
  });
}

// 住宅调组打印
export function zhuZhaiExport(data) {
  return request({
    url: "/block/zhuZhaiExport",
    method: "Post",
    data: { ...data },
  });
}

// 非住宅调组打印
export function notHouse(data) {
  return request({
    url: "/block/notHouse",
    method: "Post",
    data: { ...data },
  });
}

// 产业报表统计-直管公有住宅房屋掌管统计月报
export function industryReportOne(data) {
  return request({
    url: "/block/industryReportOne",
    method: "Post",
    data: { ...data },
  });
}
// 产业报表统计-直管公有非住宅房屋掌管统计月报
export function industryReportTwo(data) {
  return request({
    url: "/block/industryReportTwo",
    method: "Post",
    data: { ...data },
  });
}
// 产业报表统计-直管公有住宅房产估价变动汇总月报
export function industryReportThree(data) {
  return request({
    url: "/block/industryReportThree",
    method: "Post",
    data: { ...data },
  });
}
// 产业报表统计-直管公有非住宅房产估价变动汇总月报
export function industryReportFour(data) {
  return request({
    url: "/block/industryReportFour",
    method: "Post",
    data: { ...data },
  });
}
// 产业报表统计-直管公有房屋建筑形式及使用性质分类统计月报
export function industryReportFive(data) {
  return request({
    url: "/block/industryReportFive",
    method: "Post",
    data: { ...data },
  });
}
// 产业报表统计-直管公有非住宅房屋产权结构及健康情况统计月报
export function industryReportSix(data) {
  return request({
    url: "/block/industryReportSix",
    method: "Post",
    data: { ...data },
  });
}
// 产业报表统计-直管公有非住宅房屋产权结构及健康情况统计月报
export function industryReportSeven(data) {
  return request({
    url: "/block/industryReportSeven",
    method: "Post",
    data: { ...data },
  });
}
//售房报表统计-直管公房售房情况统计月报
export function industryBuyerOne(data) {
  return request({
    url: "/block/industryBuyerOne",
    method: "Post",
    data: { ...data },
  });
}
//售房报表统计-直管公房售房情况统计月报
export function industryBuyerTwo(data) {
  return request({
    url: "/block/industryBuyerTwo",
    method: "Post",
    data: { ...data },
  });
}
//售房报表统计-直管公房售房情况统计月报
export function industryBuyerThree(data) {
  return request({
    url: "/block/industryBuyerThree",
    method: "Post",
    data: { ...data },
  });
}
//售房报表统计-直管公房售房情况统计月报
export function industryBuyerFour(data) {
  return request({
    url: "/block/industryBuyerFour",
    method: "Post",
    data: { ...data },
  });
}
//售房报表统计-直管公房售房情况统计月报（军休干部购房）
export function industryBuyerFive(data) {
  return request({
    url: "/block/industryBuyerFive",
    method: "Post",
    data: { ...data },
  });
}